package com.test.daily.leetcode.y2022.m07.day0705.v09;

import java.util.ArrayList;
import java.util.List;

/**
 * @descriptions:
 * @author: Tom
 * @date: 2022/7/5 下午 10:02
 * @version: 1.0
 */
public class Solution {
    public static class MyCalendar{
        public List<int[]> arr;
        public MyCalendar(){
            arr = new ArrayList<>();
        }
        public boolean book(int start, int end){
            for(int[] ele: arr){
                int l = ele[0], r = ele[1];
                if(l <=end && r>= start){
                    return false;
                }
            }
            arr.add(new int[]{start, end});
            return true;
        }
    }
}
